package com.jinlia.show.modules.base.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jinlia.show.modules.base.config.DynamicSchemaConfig;
import com.jinlia.show.modules.base.constant.ErrandOrderStatusEnum;
import com.jinlia.show.modules.base.constant.OrderPayStatusEnum;
import com.jinlia.show.modules.base.constant.i.IBaseEnum;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName(value = "erp_errand_dada_callback", schema = DynamicSchemaConfig.schema_system)
public class ErrandDadaCallback {
    @TableId
    private Long id;
    /**
     * 配送单id
     */
    private Long errandOrderId;

    private LocalDateTime callbackTime;

    private String errandType;

    private Integer errandStatus;

    private String response;
    @TableField(exist = false)
    private String errandStatusName;

    public void setErrandStatus(Integer errandStatus) {
        this.errandStatus = errandStatus;
        this.errandStatusName = IBaseEnum.getLabelByValue(errandStatus, ErrandOrderStatusEnum.class);
    }
}
